'use strict';
exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)
	const db = uniCloud.database()
	let result = {
		code: 0,
		msg: "执行失败"
	}
	result = await db.collection("undefined-monitor").add({
		user_id: event.userId,
		cache_data: event.cacheData,	
		current_row: event.currentRow,
		create_date: Date.now()
	})
	console.log(result, 'undefined-monitor')
	//返回数据给客户端
	return result
};
